How can I cast string to enum

233

How can I cast string to enum? -

YourEnum foo = (YourEnum) Enum.Parse(typeof(YourEnum), yourString);

Comments

Submit
0 Comments